package com.niiwoo.civet.trade.dao.mapper;

import com.niiwoo.civet.trade.dao.entity.ProjectGuaranteePlan;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ProjectGuaranteePlanMapperExt extends ProjectGuaranteePlanMapper {
    /**
     * 根据标的查询所有待还回款计划
     * @param projectId
     * @return
     */
    List<ProjectGuaranteePlan> listNotReceiveGuaranteePlanByProjectId(@Param("projectId")Long projectId);

    /**
     * 查询当期待还回款计划
     * @param projectId
     * @param period
     * @return
     */
    List<ProjectGuaranteePlan> listProjectPeriodGuaranteePlan(@Param("projectId")Long projectId, @Param("period")Integer period);
    /**
     * 根据回款时间查询待还回款计划
     * @param projectId
     * @param receiveDate
     * @return
     */
    List<ProjectGuaranteePlan> listGuaranteePlanByReceiveDate(@Param("projectId")Long projectId, @Param("receiveDate")Date receiveDate);


    List<ProjectGuaranteePlan> listGuaranteePlansByInvestOrderId(@Param("investOrderId") Long investOrderId, @Param("projectId") Long projectId);

    List<ProjectGuaranteePlan> selectNeedReceiveList(@Param("projectId") Long projectId, @Param("compareDate") Date compareDate);

    ProjectGuaranteePlan getRelation(@Param("projectId") Long projectId);

    List<ProjectGuaranteePlan> selectListByProjectIdAndPeriodList(@Param("projectId") Long projectId, @Param("list") List<Integer> periodList);

    List<ProjectGuaranteePlan> selectListByProjectId(@Param("projectId") long projectId);
}